home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-20 | 1.6 KB | 81 lines | [TEXT/PJMM] |
- program PCoord;
-
- uses
- {$IFC not undefined THINK_PASCAL}
- InterfacesUI,
- {$ELSEC}
- Types, Quickdraw, Memory, Dialogs, Events, Controls, GestaltEqu, Menus,{}
- Windows, OSUtils, ToolUtils, QuickDrawText, TextUtils, {}
- {$ENDC}
- TransSkel, Assertions, PCoordAE;
-
- const
- {MENU resources}
- { Menus }
- mFile = 501;
- iQuit = 1;
-
- kAboutRes = 621; {About ALRT and STR# resource id}
- iAboutProgram = 1;
-
- var
- gFileMenu: MenuHandle;
- gColorFlag, gHas68kFPU: Boolean;
- someStr: Str255;
-
- procedure DoFileMenu (item: integer);
- begin
- case item of
- iQuit:
- SkelWhoa;
-
- otherwise
- SkelWhoa;
- end{case}
- end; { DoFileMenu }
-
- procedure DoAbout;
- begin
- if 1 = Alert(kAboutRes, nil) then
- ;
- end;
-
- procedure InitFlags;
- var
- feature: LongInt;
- begin
- gColorFlag := false;
- if noErr = Gestalt(gestaltQuickdrawVersion, feature) then
- gColorFlag := feature > 0; {0 = non-color QD}
- gHas68kFPU := false;
- if noErr = Gestalt(gestaltFPUType, feature) then
- gHas68kFPU := feature > gestaltNoFPU; { We'll take any 68kFPU }
-
-
- { Menus }
- gFileMenu := nil;
-
- end; {InitFlags}
-
- begin
- { Initialisations }
- SkelInit(6, nil);
-
- InitFlags;
-
- { Menus }
- GetIndString(someStr, kAboutRes, iAboutProgram);
- SkelApple(someStr, @DoAbout); { Two placeholders }
- gFileMenu := GetMenu(mFile);
- if SkelMenu(gFileMenu, @DoFileMenu, nil, true) then
- ; {Tell TransSkel to handle the menu}
-
- SkelSetSleep(2);
- SkelReqdAEInit(nil, nil, nil, nil); { Default behavior }
-
- InstallPCoordHandlers; { Install those handlers for my events }
-
- SkelMain; { loop til quit selected }
- SkelClobber; { clean up }
-
- end.